package com.crm.model.vo.csd.customerManager;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * @author yincuimei
 * @Date 2021/8/13 11:07
 */
@Data
public class CustomerDetailVO {

    //客户ID(主键)
    private String customerId;

    //客户名称
    private String customerName;

    //客户编号
    private String customerNumber;

    //客户类型(客户类型  0企业客户 1个人客户)
    private String customerType;

    //所在客户池(关联客户池表chs_customer_pool查)
    private String customerPoolName;

    //企业状态(客户表值--数字类型)
    private String enterpriseState;

    //企业状态(关联字典表查出的值)
    private String enterpriseStateText;

    //会员等级(数值型)
    private Integer membershipLevel;

    //会员等级(文本型值)
    private String membershipLevelText;

    //所属分公司ID
    private String companyId;

    //所属分公司名称
    private String companyName;

    //所有人ID
    private String ownerPeopleId;

    //所有人(客户表account_id关联账号表查)
    private String ownerName;

    //统一社会信用代码
    private String unifiedSocialCreditCode;

    //会员起始时间
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date membershipStartTm;

    //会员终止时间
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date membershipExpirationTm;

    //是否是客户错误数据：0：否；1：是；
    private Integer memberErrorData;

    //客户池ID
    private String customerPoolId;

    public String getCustomerName(){
        if(StringUtils.isBlank(customerName)){
            return "";
        }
        return customerName;
    }

}
